{%- unless page.hide_sidebar %}
  {%- if jekyll.environment == "development-nosidebar" %}
    <div class="sidebar__item" style="font-size: 20px; font-weight: bold; color: black;">
      {{ site.data.i18n.common.dev_menu_message[page.lang] }}
    </div>
  {%- else %}
      <div class="sidebar__wrapper-inner">
        <nav class="sidebar__container">

          <ul class="sidebar" id="mysidebar">

            {% if page.sidebar == 'embedded-modules' %}
              {% sidebar_module folder_entry_class="sidebar__item sidebar__item_parent" item_entry_class="sidebar__item" %}
            {% else %}
              {% sidebar_custom folder_entry_class="sidebar__item sidebar__item_parent" item_entry_class="sidebar__item" %}
            {% endif %}
          </ul>

        </nav>
      </div>

      <!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
      <script>$("li.active").parents('li').toggleClass("active");</script>
  {%- endif %}
{% endunless %}
